<template>
	<div class="basicGudong">
		<!-- 股东信息照片 -->
		<div class="basicGudong_img">
			<img src="../../../public/images/enterprise/gdxx@2x.png" alt="">
		</div>
		<div class="basicGudong_form">
			<!-- 表格对应的4个圆点 -->
			<div class="lineRadius l1"></div>
			<div class="lineRadius l2"></div>
			<div class="lineRadius r1"></div>
			<div class="lineRadius r2"></div>
			<!-- 股东信息表格 -->
			<table class="ntable">
			    	<tr>
			    		<th class="tx">序号</th> 
			    		<th width="45%" colspan="2">股东</th>
			     		<th colspan="">出资信息 </th>
			     		<th colspan="">持股比例</th>
			     		<th colspan="">认缴出资额 </th>
			     		<th colspan="">认缴出资日期 </th>
			     	</tr> 
			     	<tr v-for="(item,index) in baseData" :key="index">
			     		<td rowspan="1" >{{index+1}}</td> 
			     		<td colspan="2" class="left">{{item.sholder_name}}</td>
			     		<td colspan="" class="">{{item.paied_amt}}万元</td>
			     		<td colspan="" class="">{{item.proportion}}</td>
			     		<td colspan="" class="">{{item.con_amt}}万元</td>
			     		<td colspan="" class="">{{item.con_date}}</td>
			     	</tr>
			     </table>
		</div>
	</div>
</template>

<script>
	export default{
		data() {
			return{
				sbcompany:'',
				baseData:[]
			}
		},
		mounted() {
			this.getBasedata()
			this.sbcompany=this.$route.query.comname
			this.$bus.$on('updateComname',async (comname)=>{
				this.baseData=[
                {
                    "proportion":  0,
                    "sholder_name": "",
                    "con_amt": "",
                    "company_name": "",
                    "paied_amt": "",
                    "con_date": ""
                }
            ]
				this.sbcompany=comname
				this.getBasedata()
			})
		},
		methods:{
			// 获取股东信息数据
			async getBasedata(){
				this.baseData=[]
				var dt = {
					"params": {
						"normGuid": "9dbf9084-8e37-49f3-94d4-550614022714",
							"fieldList": [{
					            "key":"company_name",
					            "value":this.sbcompany
					        }]
					}
				};
				const aaa = await this.$api.post('dcockpit/rest/cockpitApi/searchListNormResult', dt)
				let {custom:{result}}={...aaa}
				this.baseData=result.cockpitData
			},
		}
	}
</script>

<style lang="stylus" rel='stylesheet/stylus' scoped>
	@import "~@/assets/basicGudong.styl"
</style>
